package com.example.service

import com.example.controller.request.UserRequest
import org.springframework.scheduling.annotation.Async
import org.springframework.stereotype.Service

/**
 *
 *
 * @author wangli
 * @date 2025-10-10
 */
@Service
class UserAsyncService (
    private val userService: UserService
){

    @Async("applicationTaskExecutor")
    fun createUserWithTransactionAsync(req: UserRequest) {
        val userId = userService.createUserWithTransactionAsync(req)
        println("Created user with ID: $userId")
    }
}